package com.banch.cloud.hystrix.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author banch
 * @version 1.0
 * @date 2020/7/10
 */
@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT", fallback = PaymentFallbackServic.class)
@Component
public interface PaymentHystrixService {

    /**
     * description
     *
     * @param
     * @return
     * @author banch
     * @date 2020/7/10
     * @throw
     **/
    @GetMapping(value = "/payment/hystrix/ok/{id}")
    String paymentOK(@PathVariable(value = "id") Integer id);


    /**
     * description
     *
     * @param
     * @return
     * @author banch
     * @date 2020/7/10
     * @throw
     **/
    @GetMapping(value = "/payment/hystrix/timeout/{id}")
    String paymentTimeout(@PathVariable(value = "id") Integer id);

}